function [status listelem] = GetDarisMetaData(DarisID)
% Call DaRIS to get all dataset metadata excluding permission info
%
% Usage: 
%    >> [~ strlist] = GetDarisMetaData('1008.2.18.3')
%
%  - Michael Eager (michael.eager@monash.edu)

%     Copyright © 2012-2013 Michael Eager <michael.eager@monash.edu> 
%
%     This file is part of Xglom.
% 
%     This is free software: you can redistribute it and/or modify
%     it under the terms of the GNU General Public License as published by
%     the Free Software Foundation, either version 3 of the License, or
%     (at your option) any later version.
% 
%     This is distributed in the hope that it will be useful,
%     but WITHOUT ANY WARRANTY; without even the implied warranty of
%     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%     GNU General Public License for more details.
% 
%     You should have received a copy of the GNU General Public License
%     along with this program.  If not, see <http://www.gnu.org/licenses/>.

% TODO timeoutcmdstr=	[' getinfo(){mainpid=$$;(sleep 10; kill $mainpid)&;watchdogpid=$!; echo "hello";source ./dcheck; $MFCOMMAND asset.get :cid ' DarisID '; kill $watchdogpid}; getinfo']	 
 cmdstr=	['source ./dcheck; $MFCOMMAND asset.get :cid ' DarisID ]
[status output] = system(cmdstr);

if status
    errordlg('GetDarisMetaData was unable to get the DaRIS infomation. Please check that you are logged into Daris, and try again.  Otherwise email your DaRIS administrator.', 'Xglom Error Dialog');
end

listelem =regexp(output, '\n', 'split');

acl_indx =find(~cellfun(@isempty,strfind(listelem,':acl')));
if ~isempty(acl_indx)
 listelem(acl_indx(1):acl_indx(end)+4)=[];
end


